import '@/styles/globals.css'
import type { AppProps } from 'next/app'

const Header = () =>{
  const color = 'blue'
  return (
    <h1 style={{textAlign: 'center', color}}>Header</h1>
  )
}
const Footer = () =>{
  return (
    <h1 style={{textAlign: 'center', color: 'red'}}>Footer</h1>
  )
}

export default function App({ Component, pageProps }: AppProps) {
  // console.log((Component as any).getTitle())
  // console.log(pageProps)
  
  // if (!!(Component as any).render) {
  //   return (
  //     (Component as any).render()
  //   )
  // }
  // else
  return (
    <>
      <Header></Header>
      <Component {...pageProps} />
      <Footer></Footer>
    </>
  )
}
